# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gnome-books
pkgver=40.0
pkgrel=1
pkgdesc="GNOME Ebook Manager"
url="https://wiki.gnome.org/Apps/Books"
arch="all !s390x !riscv64" # limited by gjs and librsvg
license="LGPL-2.0-or-later"
depends="gsettings-desktop-schemas libgepub tracker-miners gjs"
makedepends="meson gjs-dev evince-dev gnome-desktop-dev gtk+3.0-dev glib-dev
	gobject-introspection-dev tracker-dev webkit2gtk-dev libgepub-dev librsvg"
checkdepends="appstream-glib desktop-file-utils"
# Don't conflict with other packages doing a shared link of libgd
sonameprefix="$pkgname:"
subpackages="$pkgname-lang $pkgname-doc"
source="https://download.gnome.org/sources/gnome-books/${pkgver%.*}/gnome-books-$pkgver.tar.xz
	meson-0.60.patch
	"

build() {
	abuild-meson . output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
6fb6df65a493c0813cc742c08309d104ef4cc66c21d1a50e6e756824f16eec4350c89b8b7c23de35784e21197649e2390d69850632d279305ed172dfafe5ef41  gnome-books-40.0.tar.xz
62e5694de533a8d7b236c1316bfcffa5d8c4386afdbab5c1542fcb570261970c132ea60dd8368530241dd022c0bdd0a8e1df8ab3999df1ce7aeb2fb9587c03e7  meson-0.60.patch
"
